package com.itheima.service;

import com.itheima.dao.DaoStudentImpl;
import com.itheima.domain.Student;

import java.util.ArrayList;

public class ServiceStudentImpl implements ServiceStudent{
     private DaoStudentImpl dao= new DaoStudentImpl();


    @Override
    public ArrayList<Student> findAll() {
        System.out.println("全部学生的信息为：");
        return dao.findAll();
    }

    @Override
    public Student findById(Integer id) {
        System.out.println(id+"号学生为:");
        return dao.findById(id);
    }

    @Override
    public int insert(Student stu) {
        return dao.insert(stu);
    }



    @Override
    public int update(Student stu) {
        return dao.update(stu);
    }

    @Override
    public int delete(Integer sid) {
        return dao.delete(sid);
    }
}
